home *** CD-ROM | disk | FTP | other *** search
- Path: newsie.dmc.com!usenet
- From: prozac@cape.com
- Newsgroups: comp.lang.c
- Subject: Re: Help! Can't read input from keyboard!
- Date: 3 Apr 1996 02:04:20 GMT
- Organization: CENTnet Inc., Cambridge MA
- Message-ID: <4jsmb5$mlo@newsie.dmc.com>
- References: <4jq0ts$5mh@taniemarie.solon.com>
- NNTP-Posting-Host: tsa_33.cape.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- In article <4jq0ts$5mh@taniemarie.solon.com>, seebs@taniemarie.solon.com
- asks something like a trick question or are the more than one Peter Seebachs
- > #include <stdio.h>
- > int main(void) {
- > int i = 0;
- > (void) sscanf, "3", "%d", i;
- > (void) printf, "%d", i;
- > return 0;
- > }
- >
- >Can anyone help? I have cast sscanf() to void to prevent it from erroring.
-
- The void is HIDING the error!
-
- This is a "meaningless use of expression". Without the parens,
- the function identifier is a pointer not a call.
-
- They are like nul statements:
-
- ;
- 0;
- 1,2;
- etc.
-
- Use parens for normal function calls.
-
-
-
-